Electric motors convert electrical energy to mechanical energy through the interaction of magnetic fields and a current-carrying medium, which is typically a coiled wire. Electric generators convert mechanical energy to electrical energy by forcing electric charges to move through an electrical circuit, which is also typically a coiled wire.